package net.lahuobao.enums.mall.finance;

/**
 * Created by clark on 2016/9/5 0005.
 * 支付方式枚举
 */
public enum EFinPaySource {
    Integral {
        public int getValue() {
            return 1;
        }

        public String getName() {
            return "积分";
        }
    },
    ECard {
        public int getValue() {
            return 2;
        }

        public String getName() {
            return "E卡";
        }
    },
    LhbBalance {
        public int getValue() {
            return 3;
        }

        public String getName() {
            return "拉货宝余额";
        }
    },
    Online {
        public int getValue() {
            return 4;
        }

        public String getName() {
            return "在线支付";
        }
    },
    Steward {
        public int getValue() {
            return 5;
        }

        public String getName() {
            return "物流管家";
        }
    },
    UseOrder {
        public int getValue() {
            return 11;
        }

        public String getName() {
            return "使用订单进行支付";
        }
    },
    OilCardRecharge {
        public int getValue() {
            return 12;
        }

        public String getName() {
            return "油卡充值进行支付";
        }
    };

    public static String valueOf(Integer value) {
        switch (value) {
            case 1:
                return EFinPaySource.Integral.getName();
            case 2:
                return EFinPaySource.ECard.getName();
            case 3:
                return EFinPaySource.LhbBalance.getName();
            case 4:
                return EFinPaySource.Online.getName();
            case 5:
                return EFinPaySource.Steward.getName();
            case 11:
                return EFinPaySource.UseOrder.getName();
            case 12:
                return EFinPaySource.OilCardRecharge.getName();
        }
        return "";
    }

    public abstract int getValue();

    public abstract String getName();
}
